<div class="form-group">
    <label class="control-label" for="textinput">小区:</label>
    <select ng-model="communityId" ng-options="m.objId as m.communityName for m in communityLabelList.data">
        <option value="">-- 请选择 --</option>
    </select>
    <label class="control-label" for="textinput">审核状态:</label>
    <select ng-model="status">
        <option value="">-- 请选择 --</option>
        <option>未通过</option>
        <option>已通过</option>
    </select>
    <label class="control-label" for="textinput">昵称:</label>
    <input type="text" class="" ng-model="nickname" />
    <button type="button" class="btn-primary btn-sm  " ng-click="getUserList(communityId,status,nickname)">搜索</button>
</div>

<paging>
    <ul class="pagination" num-pages="tasks.pageCount" current-page="tasks.currentPage"
        on-select-page="selectPage(page)">
        <li ng-class="{disabled: noPrevious()}"><a ng-click="selectPrevious()">&laquo;</a>

        </li>
        <li ng-repeat="page in pages" ng-class="{active: isActive(page)}"><a
                ng-click="selectPage(page)">{{page}}</a>

        </li>
        <li ng-class="{disabled: noNext()}"><a ng-click="selectNext()">&raquo;</a>

        </li>
        <li ng-show="currentPage>6"><a ng-click="selectPage(1)">首页</a>

        </li>
    </ul>
</paging>

<div class="tab-content">
    <div class="tab-pane active" id="tab_a">
        <table class="table table-condensed">
            <thead>
            <tr>
                <th>小区</th>
                <th>昵称</th>
                <th>单元</th>
                <th>房号</th>
                <th>申请时间</th>
                <th>申请资料</th>
                <th>操作</th>
            </tr>
            </thead>
            <tbody>
            <tr ng-repeat="user in userList">

                <td>{{user.community.communityName}}</td>
                <td>{{user.user.nickName}}</td>
                <td>{{user.user.roomUnit}}</td>
                <td>{{user.user.roomNumber}}</td>
                <td>{{user.dateCreated | date:'yyyy-MM-dd HH:mm:ss'}}</td>
                <td><img ng-show="user.imageURL!=null" ng-src="{{user.imageURL}}" width="100" data-toggle="modal"
                         data-target="#img{{$index}}">

                    <div class="modal fade" id="img{{$index}}" tabindex="-1" role="dialog"
                         aria-labelledby="myModalLabel" aria-hidden="true">
                        <div class="modal-dialog">
                            <div class="modal-content">
                                <div class="modal-header">
                                    <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span
                                            aria-hidden="true">&times;</span></button>
                                    <h5 class="modal-title" id="myModalLabel">{{user.user.nickName}}</h5>
                                </div>
                                <div class="modal-body">
                                    <img ng-src="{{user.imageURL}}">
                                </div>
                                <div class="modal-footer">
                                    <button type="button" class="btn btn-default btn-sm" data-dismiss="modal">Close
                                    </button>
                                </div>
                            </div>
                        </div>
                    </div>

                    <span ng-show="user.imageURL==null&&user.promotionCode==null">用户管理中修改</span>
                    <span ng-show="user.imageURL==null&&user.promotionCode!=null">{{user.promotionCode}}</span>

                </td>
                <td width="200">
                    <span ng-if="user.status == false">
                        <a class="btn btn-primary btn-xs" ng-click="clickStatus(user)">通过</a>
                        <a class="btn btn-danger btn-xs"
                           data-toggle="modal" data-target="#refusal{{$index}}">拒绝</a>

                         <div class="modal fade" id="refusal{{$index}}" tabindex="-1" role="dialog"
                              aria-labelledby="myModalLabel" aria-hidden="false">
                             <div class="modal-dialog">
                                 <div class="modal-content">
                                     <div class="modal-header">
                                         <button type="button" class="close" data-dismiss="modal"
                                                 aria-label="Close"><span
                                                 aria-hidden="true">&times;</span></button>
                                         <h5 class="modal-title" id="refusal">拒绝原因：</h5>
                                     </div>
                                     <div class="modal-body">
                                         <textarea rows="10" ng-model="refusal" required
                                                   style="width:100%"
                                                   tabindex="7"></textarea>
                                     </div>
                                     <div class="modal-footer">
                                         <button ng-click="ClickRefusal(user.objId,user.user.objId,user.community.objId,refusal)"
                                                 type="submit"
                                                 class="btn btn-default btn-sm" data-dismiss="modal">确定
                                         </button>
                                     </div>
                                 </div>
                             </div>
                         </div>
                    </span>

                    <span ng-if="user.status == true">
                        <a class="btn btn-danger btn-xs" ng-click="clickStatus(user)">取消认证</a>
                      </span>
                </td>
            </tr>
            </tbody>
        </table>
    </div>
</div>